package net.techwatch.jsni.client;

import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.dom.client.Element;

public class RaphaelJS extends JavaScriptObject {

	protected static class Shape extends JavaScriptObject {
		
		protected Shape() {
			
		}
		
		public final native Shape rotate(double degree, boolean abs) /*-{
			return this.rotate(degree, abs);
		}-*/;
		
		public final native Shape translate(double dx, double dy) /*-{
			return this.translate(dx, dy);
		}-*/;
		
		public final native Element node() /*-{
			return this.node;
		}-*/;
	}
	
	protected RaphaelJS() {
		
	}
	
	public final static native RaphaelJS create(Element e, int w, int h) /*-{
		return $wnd.Raphael(e, w, h);
	}-*/;
	
	public final native Element node() /*-{
		return this.node;
	}-*/;
	
	public final native Shape circle(double x, double y, double r) /*-{
		return this.circle(x, y, r);
	}-*/;
	
	public final native Shape rect(double x, double y, double w, double h) /*-{
		return this.rect(x, y, w, h);
	}-*/;
}
